<template>
  <div id="app">

    
    <!-- <HelloWorld msg="Welcome to Your Vue.js App"/> -->
    <!-- 搜索框模块 -->
    <div class="clearfix" style="margin-bottom:20px;">
      <div style="width:500px;float:left">
        <el-input placeholder="请输入内容" v-model="input3" class="input-with-input">
        <el-button slot="append" icon="el-icon-search"></el-button>
        </el-input>
      </div>
      <el-button type="primary" style="float:right" >添加</el-button>
      <!-- <el-button type="primary" style="float:right" @click="addCollege()">添加</el-button> -->
    </div>

  <!-- 院校信息展示模块 -->
  <el-table :data="tableData" borderstyle="" border>
    <el-table-column type="index" label="序号" width="180"></el-table-column>
    <el-table-column prop="id"  label="课程编号" width="180"></el-table-column>
    <el-table-column prop="courseName" label="课程名称"></el-table-column>
    <el-table-column  label="操作">
      <template>
      <el-button type="primary" icon="el-icon-edit" circle></el-button>
      <el-button type="danger" icon="el-icon-delete" circle ></el-button>
      </template>
    </el-table-column>
  </el-table>


<!-- 添加院校弹出框模块 -->
  <!-- <el-dialog title="添加院校" :visible.sync="dialogAddVisible" width="30%">
  <el-form :model="form" :rules="rules" ref="form">
    <el-form-item label="院校名称" :label-width="formLabelWidth" prop="collegeName">
      <el-input v-model="form.collegeName" autocomplete="off"></el-input>
    </el-form-item>
    <el-form-item label="联系人" :label-width="formLabelWidth">
      <el-input v-model="form.contact" autocomplete="off"></el-input>
    </el-form-item>
    <el-form-item label="联系电话" :label-width="formLabelWidth">
      <el-input v-model="form.tel" autocomplete="off"></el-input>
    </el-form-item>
    <el-form-item label="所属区域" :label-width="formLabelWidth">
      <el-select v-model="form.region" placeholder="请选择院校区域" style="width:100%">
        <el-option label="河南" value="河南"></el-option>
        <el-option label="北京" value="北京"></el-option>
      </el-select>
    </el-form-item>
     <el-form-item label="地址" :label-width="formLabelWidth">
      <el-input v-model="form.address" autocomplete="off"></el-input>
    </el-form-item>
  </el-form>
  <div slot="footer" class="dialog-footer" style="text-align:center">
    <el-button type="primary" @click="addCollege('form')">提交</el-button>
    <el-button @click="dialogAddVisible = false">取 消</el-button>
  </div>
</el-dialog> -->


<!-- 修改院校弹出框模块 -->
  <!-- <el-dialog title="修改院校" :visible.sync="dialogEditVisible" width="30%">
  <el-form :model="editForm" :rules="rules" ref="editForm">
    <el-form-item label="院校名称" :label-width="formLabelWidth" prop="collegeName">
      <el-input v-model="editForm.collegeName" autocomplete="off"></el-input>
    </el-form-item>
    <el-form-item label="联系人" :label-width="formLabelWidth">
      <el-input v-model="editForm.contact" autocomplete="off"></el-input>
    </el-form-item>
    <el-form-item label="联系电话" :label-width="formLabelWidth">
      <el-input v-model="editForm.tel" autocomplete="off"></el-input>
    </el-form-item>
    <el-form-item label="所属区域" :label-width="formLabelWidth">
      <el-select v-model="editForm.region" placeholder="请选择院校区域" style="width:100%">
        <el-option label="河南" value="河南"></el-option>
        <el-option label="北京" value="北京"></el-option>
      </el-select>
    </el-form-item>
     <el-form-item label="地址" :label-width="formLabelWidth">
      <el-input v-model="editForm.address" autocomplete="off"></el-input>
    </el-form-item>
  </el-form>
    <div slot="footer" class="dialog-footer" style="text-align:center">
      <el-button type="primary" @click="updateCollege(editForm)">提交</el-button>
      <el-button @click="dialogEditVisible = false">取 消</el-button>
  </div>      
</el-dialog> -->
  </div>
</template>

<script>

export default {
  name: 'course',
  data() {
      return {
        input3:'',
        select:'',
        dialogAddVisible: false,
        dialogEditVisible: false,
        form: {
          courseName: '',
          delivery: false,
          type: []
         
        },
        formLabelWidth: '120px',
        tableData: []
      }
    },
    created(){
        this.render();//渲染数据
    },
  methods: {
    //增加院校方法
    async render(){
        const {data:res} = await this.$http.post('orginfo/queryall') // 获取数据
        this.tableData=res.data.resList;

    }
   
    }
}

</script>

<style>
#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
.el-select .el-input {
    width: 130px;
}
.input-with-select{
   width:500px;
}
.input-with-select .el-input-group__prepend {
    background-color: #fff;  
}
.clearfix{*zoom:1}
.clearfix:after{
  display: block;
  content:"";
  height:0;
  clear: both;
  visibility: hidden;
}
.el-select .el-input{
  width:100%;
  }
</style>
